/**
 * Created with IntelliJ IDEA.
 * User: render
 * Date: 12-11-30
 * Time: 下午5:39
 * To change this template use File | Settings | File Templates.
 */

(function(){
    fl.runScript(fl.configURI + "jsfl/core.jsfl");
    var d = dom();
    var its = $('lib').s().get();
    if(!its){
        alert('select items you want to export');
        return;
    }
    its.forEach(function(it){
        tl().removeFrames(1, cur_layer().frames.length);
        if(!it){
            alert('select one item first!');
            return;
        }
        var n = it.name;
        lib().selectItem(n, true);
        lib().addItemToDocument({ x: d.width / 2, y: d.height / 2 }, n);
        d.exportSWF("file:///E:/ZhangDongCai/Flash/OCT_BoTuoFeiNuo/export/2560/flvs/" + n);
//        d.exportSWF("file:///E:/ZhangDongCai/Flash/OCT_BoTuoFeiNuo/export/ios/flvs/" + n);
//        lib().deleteItem();
        dom().deleteSelection();
        tl().deleteLayer();
    });

})();